package com.bb.flow.config.enumtype;

/**
 * @author bigbeard
 * 节点类型枚举
 */
public enum NodeType {

    /**
     * 无节点信息
     */
    NONE(0, "空节点"),

    /**
     * 功能节点
     */
    FUNCTION_NODE(1, "功能节点"),
    /**
     * 容器节点
     */
    CONTAINER_NODE(2, "容器节点"),
    /**
     * 子流程节点
     */
    SUBFLOW_NODE(3, "子流程节点"),
    /**
     * 判断节点
     */
    JUDGE_NODE(4, "判断节点");

    private final String name;
    private final int code;

    NodeType(int code, String name) {
        this.name = name;
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public int getCode() {
        return code;
    }

    @Override
    public String toString() {
        return super.toString().toUpperCase();
    }
}
